<?php

/**
 * @author Grover Campos
 * @version 1.0
 * @created 03-ago-2009 06:43:06 p.m.
 */
class Gtux_Model_Table_Campo extends Zend_Db_Table_Abstract 
{
	protected $_name = 'campos';
	
	protected $_referenceMap    = array(
    'Formulario'     => array(
      'columns'       => 'id_formulario',
	    'refTableClass' => 'Gtux_Model_Table_Formulario',
	    'refColumns'    => 'id_formulario',
	    'onDelete'      => self::CASCADE,
	    'onUpdate'      => self::CASCADE
	  ),
	  'Subformulario'  => array(
	    'columns'       => array('id_formulario', 'id_subformulario'),
	    'refTableClass' => 'Gtux_Model_Table_Subformulario',
	    'refColumns'    => array('id_formulario', 'id_subformulario'),
      'onDelete'      => self::CASCADE,
      'onUpdate'      => self::CASCADE
	  ),
	  'Elemento'       => array(
      'columns'       => 'id_elemento', 
      'refTableClass' => 'Gtux_Model_Table_Elemento',
	    'refColumns'    => 'id_elemento',
	    'onDelete'      => self::SET_NULL,
	    'onUpdate'      => self::SET_NULL
	  ),
	  'Usuario'        => array(
      'columns'       => 'id_user',
      'refTableClass' => 'Gtux_Model_Table_User',
      'refColumns'    => 'id_user',
      'onDelete'      => self::CASCADE,
      'onUpdate'      => self::CASCADE
	  )	   
	);
}
?>